using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.IO;

namespace POS_NEW
{
    public partial class ConfirmScreen : Form
    {
        public ConfirmScreen(string text)
        {
            InitializeComponent();
            this.lbl_Status.Text = text;
        }

        private void FormOnKeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.btn_Cancel_Click(sender, e);
            }
            else if (e.KeyCode == Keys.Enter)
            {
				if(sender.Equals(btn_Cancel))
				{
					this.btn_Cancel_Click(sender, e);
				}
				else
				{
					this.btn_OK_Click(sender,e);
				}
            }
        }
        private void btn_Cancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        private void btn_OK_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }
    }
}